Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(radio): tailwindify #1696

Merged
merged 5 commits into from
Mar 11, 2021
Merged

refactor(radio): tailwindify #1696

merged 5 commits into from
Mar 11, 2021

Conversation

julio8a
Copy link

@julio8a julio8a commented Mar 7, 2021

Supports #1694 #1500

Medium: code and design have 14px, however, tailwind doesn't have this vlaue. Tailwind 2.0 does have it, maybe a reason to update? @jrowlingson

Large: code has 20px, design has 18px (which is not a tailwind value). Used 20px for now.
^^ @bstifle

@julio8a julio8a requested a review from a team as a code owner March 7, 2021 00:11
@julio8a julio8a self-assigned this Mar 7, 2021
@bstifle
Copy link

bstifle commented Mar 8, 2021

should be 12/14/18 so they pair with 12/14/18 labels and most components which use 12/14/18 type

@paulcpederson
Copy link
Member

@julio8a you could use the font size scale from theme to make it explicit this is sized relative to text. Also, since the value is frequently used you could set via a CSS var like we do in other components:

:host([scale="s"]) {
  --calcite-radio-size: theme("fontSize.-2");
}
:host([scale="m"]) {
  --calcite-radio-size: theme("fontSize.-1");
}
:host([scale="l"]) {
  --calcite-radio-size: theme("fontSize.1");
}
  
.radio {
  height: var(--calcite-radio-size);
  min-width: var(--calcite-radio-size);
  max-width: var(--calcite-radio-size);
}

This also means that they will scale with the text when users zoom as they'll be in rem

@bstifle
Copy link

bstifle commented Mar 8, 2021

jake-love
that sounds dope

box-shadow: inset 0 0 0 1px var(--calcite-ui-border-1);
cursor: pointer;
@apply rounded-full cursor-pointer;
box-shadow: inset 0 0 0 1px var(--calcite-ui-border-input);
transition: all 0.15s ease-in-out;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

transition-all duration-150 ease-in-out

@julio8a julio8a merged commit 2dbeca0 into master Mar 11, 2021
@julio8a julio8a deleted the julio8a/radio branch March 11, 2021 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants